package com.example.mapper;

import com.example.entity.Shoucang;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ShoucangMapper {

    void insert(Shoucang shoucang);

    void deleteById(Shoucang shoucang);

    void updateById(Shoucang shoucang);

    List<Shoucang> selectAll(Shoucang shoucang);

    @Select("select * from shoucang where id = #{userId}")
    Shoucang selectById(Integer shoucang);
    @Select("select * from shoucang where user_id = #{userId} and shangpin_id = #{shangpinId}")
    Shoucang selectByUserId(Integer userId, Integer shangpinId);
}
